﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="DataSetDatabasesAndFiles" targetNamespace="http://tempuri.org/DataSetDatabaseandFiles.xsd" xmlns:mstns="http://tempuri.org/DataSetDatabaseandFiles.xsd" xmlns="http://tempuri.org/DataSetDatabaseandFiles.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
  <xs:annotation>
    <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
      <DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
        <Connections>
          <Connection ConnectionStringObject="Data Source=.;Initial Catalog=SQLServerOptimizer;Integrated Security=True" IsAppSettingsProperty="false" Modifier="Assembly" Name="sereena-pc\sereenasql2008.SQLServerHealthCheckDeploy.dbo" ParameterPrefix="@" Provider="System.Data.SqlClient" />
        </Connections>
        <Tables>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="TableAdapterDatabasesAndFiles" GeneratorDataComponentClassName="TableAdapterDatabasesAndFiles" Name="DatabasesAndFiles" UserDataComponentName="TableAdapterDatabasesAndFiles">
            <MainSource>
              <DbSource ConnectionRef="sereena-pc\sereenasql2008.SQLServerHealthCheckDeploy.dbo" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="false" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="false" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT        Server.Name AS Server, Service.Name AS Instance, [Database].DatabaseName AS [Database], [Database].Collation, [Database].Owner, [Database].CreateDate, 
                         [Database].RecoveryModel, [Database].State, [Database].CompatibilityLevel, [Database].DatabaseVersion, [Database].LatestFullBackup, 
                         [Database].LatestDifferentialBackup, [Database].LatestLogBackup, DatabaseFile.FileGroup, DatabaseFile.[File], DatabaseFile.Drive, DatabaseFile.SizeInMb
FROM            Server INNER JOIN
                         Service ON Server.ServerID = Service.ServerID LEFT OUTER JOIN
                         [Database] ON Service.ServiceID = [Database].ServiceID INNER JOIN
                         DatabaseFile ON [Database].DatabaseID = DatabaseFile.DatabaseID
WHERE        (Service.ServiceTypeID = 1) AND (Service.ServiceID = @ServiceID) AND (@databaseID = [Database].DatabaseID OR
                         @databaseID = - 1) OR
                         (Service.ServiceTypeID = 1) AND (@ServiceID = - 1) AND (@databaseID = [Database].DatabaseID OR
                         @databaseID = - 1) AND (Service.ServiceTypeID = 1)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="ServiceID" ColumnName="ServiceID" DataSourceName="SQLServerOptimizer.dbo.Service" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ServiceID" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="ServiceID" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="databaseID" ColumnName="" DataSourceName="" DataTypeServer="unknown" DbType="Int32" Direction="Input" ParameterName="@databaseID" Precision="0" ProviderType="Int" Scale="0" Size="1024" SourceColumn="" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Collation" DataSetColumn="Collation" />
              <Mapping SourceColumn="Owner" DataSetColumn="Owner" />
              <Mapping SourceColumn="CreateDate" DataSetColumn="CreateDate" />
              <Mapping SourceColumn="RecoveryModel" DataSetColumn="RecoveryModel" />
              <Mapping SourceColumn="State" DataSetColumn="State" />
              <Mapping SourceColumn="CompatibilityLevel" DataSetColumn="CompatibilityLevel" />
              <Mapping SourceColumn="DatabaseVersion" DataSetColumn="DatabaseVersion" />
              <Mapping SourceColumn="LatestFullBackup" DataSetColumn="LatestFullBackup" />
              <Mapping SourceColumn="LatestDifferentialBackup" DataSetColumn="LatestDifferentialBackup" />
              <Mapping SourceColumn="LatestLogBackup" DataSetColumn="LatestLogBackup" />
              <Mapping SourceColumn="FileGroup" DataSetColumn="FileGroup" />
              <Mapping SourceColumn="File" DataSetColumn="File" />
              <Mapping SourceColumn="Drive" DataSetColumn="Drive" />
              <Mapping SourceColumn="SizeInMb" DataSetColumn="SizeInMb" />
              <Mapping SourceColumn="Server" DataSetColumn="Server" />
              <Mapping SourceColumn="Database" DataSetColumn="Database" />
              <Mapping SourceColumn="Instance" DataSetColumn="Instance" />
            </Mappings>
            <Sources />
          </TableAdapter>
        </Tables>
        <Sources />
      </DataSource>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="DataSetDatabasesAndFiles" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:EnableTableAdapterManager="true" msprop:Generator_DataSetName="DataSetDatabasesAndFiles" msprop:Generator_UserDSName="DataSetDatabasesAndFiles">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="DatabasesAndFiles" msprop:Generator_TableClassName="DatabasesAndFilesDataTable" msprop:Generator_TableVarName="tableDatabasesAndFiles" msprop:Generator_TablePropName="DatabasesAndFiles" msprop:Generator_RowDeletingName="DatabasesAndFilesRowDeleting" msprop:Generator_UserTableName="DatabasesAndFiles" msprop:Generator_RowChangingName="DatabasesAndFilesRowChanging" msprop:Generator_RowEvHandlerName="DatabasesAndFilesRowChangeEventHandler" msprop:Generator_RowDeletedName="DatabasesAndFilesRowDeleted" msprop:Generator_RowEvArgName="DatabasesAndFilesRowChangeEvent" msprop:Generator_RowChangedName="DatabasesAndFilesRowChanged" msprop:Generator_RowClassName="DatabasesAndFilesRow">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Collation" msprop:Generator_ColumnVarNameInTable="columnCollation" msprop:Generator_ColumnPropNameInRow="Collation" msprop:Generator_ColumnPropNameInTable="CollationColumn" msprop:Generator_UserColumnName="Collation" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Owner" msprop:Generator_ColumnVarNameInTable="columnOwner" msprop:Generator_ColumnPropNameInRow="Owner" msprop:Generator_ColumnPropNameInTable="OwnerColumn" msprop:Generator_UserColumnName="Owner" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="CreateDate" msprop:Generator_ColumnVarNameInTable="columnCreateDate" msprop:Generator_ColumnPropNameInRow="CreateDate" msprop:Generator_ColumnPropNameInTable="CreateDateColumn" msprop:Generator_UserColumnName="CreateDate" type="xs:dateTime" minOccurs="0" />
              <xs:element name="RecoveryModel" msprop:Generator_ColumnVarNameInTable="columnRecoveryModel" msprop:Generator_ColumnPropNameInRow="RecoveryModel" msprop:Generator_ColumnPropNameInTable="RecoveryModelColumn" msprop:Generator_UserColumnName="RecoveryModel" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="State" msprop:Generator_ColumnVarNameInTable="columnState" msprop:Generator_ColumnPropNameInRow="State" msprop:Generator_ColumnPropNameInTable="StateColumn" msprop:Generator_UserColumnName="State" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="CompatibilityLevel" msprop:Generator_ColumnVarNameInTable="columnCompatibilityLevel" msprop:Generator_ColumnPropNameInRow="CompatibilityLevel" msprop:Generator_ColumnPropNameInTable="CompatibilityLevelColumn" msprop:Generator_UserColumnName="CompatibilityLevel" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="DatabaseVersion" msprop:Generator_ColumnVarNameInTable="columnDatabaseVersion" msprop:Generator_ColumnPropNameInRow="DatabaseVersion" msprop:Generator_ColumnPropNameInTable="DatabaseVersionColumn" msprop:Generator_UserColumnName="DatabaseVersion" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="LatestFullBackup" msprop:Generator_ColumnVarNameInTable="columnLatestFullBackup" msprop:Generator_ColumnPropNameInRow="LatestFullBackup" msprop:Generator_ColumnPropNameInTable="LatestFullBackupColumn" msprop:Generator_UserColumnName="LatestFullBackup" type="xs:dateTime" minOccurs="0" />
              <xs:element name="LatestDifferentialBackup" msprop:Generator_ColumnVarNameInTable="columnLatestDifferentialBackup" msprop:Generator_ColumnPropNameInRow="LatestDifferentialBackup" msprop:Generator_ColumnPropNameInTable="LatestDifferentialBackupColumn" msprop:Generator_UserColumnName="LatestDifferentialBackup" type="xs:dateTime" minOccurs="0" />
              <xs:element name="LatestLogBackup" msprop:Generator_ColumnVarNameInTable="columnLatestLogBackup" msprop:Generator_ColumnPropNameInRow="LatestLogBackup" msprop:Generator_ColumnPropNameInTable="LatestLogBackupColumn" msprop:Generator_UserColumnName="LatestLogBackup" type="xs:dateTime" minOccurs="0" />
              <xs:element name="FileGroup" msprop:Generator_ColumnVarNameInTable="columnFileGroup" msprop:Generator_ColumnPropNameInRow="FileGroup" msprop:Generator_ColumnPropNameInTable="FileGroupColumn" msprop:Generator_UserColumnName="FileGroup" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="150" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="File" msprop:Generator_ColumnVarNameInTable="columnFile" msprop:Generator_ColumnPropNameInRow="File" msprop:Generator_ColumnPropNameInTable="FileColumn" msprop:Generator_UserColumnName="File">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="150" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Drive" msprop:Generator_ColumnVarNameInTable="columnDrive" msprop:Generator_ColumnPropNameInRow="Drive" msprop:Generator_ColumnPropNameInTable="DriveColumn" msprop:Generator_UserColumnName="Drive" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="SizeInMb" msprop:Generator_ColumnVarNameInTable="columnSizeInMb" msprop:Generator_ColumnPropNameInRow="SizeInMb" msprop:Generator_ColumnPropNameInTable="SizeInMbColumn" msprop:Generator_UserColumnName="SizeInMb" type="xs:decimal" minOccurs="0" />
              <xs:element name="Server" msprop:Generator_ColumnVarNameInTable="columnServer" msprop:Generator_ColumnPropNameInRow="Server" msprop:Generator_ColumnPropNameInTable="ServerColumn" msprop:Generator_UserColumnName="Server" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Database" msprop:Generator_ColumnVarNameInTable="columnDatabase" msprop:Generator_ColumnPropNameInRow="Database" msprop:Generator_ColumnPropNameInTable="DatabaseColumn" msprop:Generator_UserColumnName="Database" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="200" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Instance" msprop:Generator_ColumnVarNameInTable="columnInstance" msprop:Generator_ColumnPropNameInRow="Instance" msprop:Generator_ColumnPropNameInTable="InstanceColumn" msprop:Generator_UserColumnName="Instance" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
  </xs:element>
</xs:schema>